import { PORT1 } from "@/api/config/servicePort";
import http from "@/api";

/**
 * 
 *   $t("goods_type.add_goods_type") //添加商品类型
 * 
 * 
 */




//商品类型公共数据
export const getGoodsTypeInitApi = (params: FormData) => {
    return http.post(PORT1+`/goods-config/settings/goods-type/index`, params, { cancel: false,loading: false  });
};


//商品类型列表头部
export const getGoodsTypeTableHeadApi = (params: FormData) => {
    return http.get(PORT1+`/goods-config/settings/goods-type/field`, params, { cancel: false,loading: false  });
};

//商品类型列表
export const getGoodsTypeTableDataApi = (params: FormData) => {
    return http.post(PORT1+`/goods-config/settings/goods-type/list?get_auth=1&&auth_name=archiveSetGoodsType`, params,  { cancel: false,loading: false  });
};

//添加编辑商品类型
export const saveGoodsTypeTableDataApi = (params: FormData) => {
    return http.post(PORT1+`/goods-config/settings/goods-type/edit`, params,  { cancel: false,loading: false  });
};

//添加商品分类
export const saveGoodsClassDataApi = (params: FormData) => {
    return http.post(PORT1+`/goods-config/settings/goods-type/create-class`, params,  { cancel: false,loading: false  });
};